FROM alpine:latest
RUN apk update
RUN apk add git gcc libc-dev make re2c file vim nginx g++ curl
RUN apk add php7
RUN apk add php7-fpm
RUN apk add php7-dev
RUN apk add php7-phar
RUN apk add php7-json
RUN apk add php7-xml
RUN apk add php7-fileinfo
RUN apk add php7-dom
RUN apk add php7-iconv
RUN apk add php7-mbstring
RUN apk add php7-ctype
RUN apk add php7-curl
RUN apk add php7-gd
RUN apk add php7-intl
RUN apk add php7-mcrypt
RUN apk add php7-pdo
RUN apk add php7-pdo_mysql
RUN apk add php7-session
RUN apk add php7-openssl
RUN apk add php7-zip
RUN apk add php7-zlib
RUN apk add php7-redis
RUN apk add php7-imap
RUN apk add php7-simplexml
RUN apk add php7-xmlreader
RUN apk add php7-xmlwriter
RUN apk add php7-tokenizer
RUN apk add php7-bcmath
RUN apk add php7-pecl-yaml
RUN apk add tzdata
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo "Asia/Shanghai" > /etc/timezone
RUN apk del tzdata
RUN rm -rf /var/cache/apk/*
RUN cd /root && git clone https://github.com/phalcon/php-zephir-parser.git && cd php-zephir-parser && phpize && ./configure && make && make install && rm -rf /root/php-zephir-parser
RUN cd /root && git clone -b v4.3.5 https://github.com/swoole/swoole-src.git && cd swoole-src && phpize && ./configure && make && make install && rm -rf /root/swoole-src
RUN wget -O /usr/bin/zephir https://github.com/phalcon/zephir/releases/download/0.12.0/zephir.phar && chmod a+x /usr/bin/zephir